﻿/*
* Walking.h
*
* 行走
*
* create date: 2014.4.17
* create by: leo
*
*/

#ifndef _WALKING_H_
#define _WALKING_H_

#include "cocos2d.h"
#include "../Common.h"

#include "BaseSkill.h"

class CBaseHero;

class CWalking : public CBaseSkill
{
public:
	static CBaseSkill* create(Param& param);

public:
	virtual void use();
	virtual void stop();
	/*
	 * 设置移动到目的坐标
	 * x x坐标
	 * y y坐标
	 */
	void setDestination(int x, int y);

	virtual ~CWalking();

protected:
	CWalking(Param& param);

	virtual void onReachDest(cocos2d::CCObject* obj);

//	void onFrameEvent(cocos2d::extension::Bone *bone, const char *evt, int originFrameIndex, int currentFrameIndex);

protected:
	cocos2d::CCPoint mDestPos;
	cocos2d::CCAction* mAction;

};

#endif // _WALKING_H_
